package com.rd.sys.dto.client.analysis.config;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import baseproj.common.constants.EnumUtil;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

public class AnalysisConfig {

    public static final List<AnalysisConfig> heatConfigList = new LinkedList<AnalysisConfig>() {
        {
            add(new AnalysisConfig(HeatConfig.Key.Radius.getCode(), HeatConfig.Key.Radius.getName(),
                    EnumUtil.getValues(HeatConfig.Radius.values()), HeatConfig.Radius.Radius_30.getCode(),
                    HeatConfig.Key.Radius.getDescription()));
            add(new AnalysisConfig(CommonConfig.Key.VideoPlaySpeed.getCode(),
                    CommonConfig.Key.VideoPlaySpeed.getName(),
                    EnumUtil.getValues(CommonConfig.VideoPlaySpeed.values()),
                    CommonConfig.VideoPlaySpeed.PlaySpeed_1.getCode(), CommonConfig.Key.VideoPlaySpeed.getDescription()));
        }
    };

    public static final List<AnalysisConfig> routeConfigList = new LinkedList<AnalysisConfig>() {
        {
            add(new AnalysisConfig(RouteConfig.Key.DataSourceType.getCode(), RouteConfig.Key.DataSourceType.getName(),
                    EnumUtil.getValues(RouteConfig.DataSourceType.values()),
                    RouteConfig.DataSourceType.DataSource_Fiaxtion.getCode(),
                    RouteConfig.Key.DataSourceType.getDescription()));
            add(new AnalysisConfig(RouteConfig.Key.RadiusType.getCode(), RouteConfig.Key.RadiusType.getName(),
                    EnumUtil.getValues(RouteConfig.RadiusType.values()),
                    RouteConfig.RadiusType.RadiusType_Alterable.getCode(), RouteConfig.Key.RadiusType.getDescription()));
            add(new AnalysisConfig(RouteConfig.Key.AlterableRadius.getCode(),
                    RouteConfig.Key.AlterableRadius.getName(),
                    EnumUtil.getValues(RouteConfig.AlterableRadius.values()),
                    RouteConfig.AlterableRadius.Radius_30.getCode(), RouteConfig.Key.AlterableRadius.getDescription()));
            add(new AnalysisConfig(RouteConfig.Key.Radius.getCode(), RouteConfig.Key.Radius.getName(),
                    EnumUtil.getValues(RouteConfig.Radius.values()), RouteConfig.Radius.Radius_30.getCode(),
                    RouteConfig.Key.Radius.getDescription()));
            add(new AnalysisConfig(RouteConfig.Key.Diaphaneity.getCode(), RouteConfig.Key.Diaphaneity.getName(),
                    EnumUtil.getValues(RouteConfig.Diaphaneity.values()),
                    RouteConfig.Diaphaneity.Diaphaneity_30.getCode(), RouteConfig.Key.Diaphaneity.getDescription()));
            add(new AnalysisConfig(CommonConfig.Key.VideoPlaySpeed.getCode(),
                    CommonConfig.Key.VideoPlaySpeed.getName(),
                    EnumUtil.getValues(CommonConfig.VideoPlaySpeed.values()),
                    CommonConfig.VideoPlaySpeed.PlaySpeed_1.getCode(), CommonConfig.Key.VideoPlaySpeed.getDescription()));

            // 静态播放去掉速率
            // add(new AnalysisConfig(RouteConfig.Key.PlaySpeed.getCode(),
            // RouteConfig.Key.PlaySpeed.getName(),
            // EnumUtil.getValues(RouteConfig.PlaySpeed.values()),
            // RouteConfig.PlaySpeed.PlaySpeed_1.getCode(),
            // RouteConfig.Key.PlaySpeed.getDescription()));
        }
    };

    public static final List<AnalysisConfig> focusConfigList = new LinkedList<AnalysisConfig>() {
        {
            add(new AnalysisConfig(FocusConfig.Key.Radius.getCode(), FocusConfig.Key.Radius.getName(),
                    EnumUtil.getValues(FocusConfig.Radius.values()), FocusConfig.Radius.Radius_30.getCode(),
                    FocusConfig.Key.Radius.getDescription()));
            add(new AnalysisConfig(CommonConfig.Key.VideoPlaySpeed.getCode(),
                    CommonConfig.Key.VideoPlaySpeed.getName(),
                    EnumUtil.getValues(CommonConfig.VideoPlaySpeed.values()),
                    CommonConfig.VideoPlaySpeed.PlaySpeed_1.getCode(), CommonConfig.Key.VideoPlaySpeed.getDescription()));
        }
    };

    public static final List<AnalysisConfig> gridConfigList = new LinkedList<AnalysisConfig>() {
        {
            add(new AnalysisConfig(GridConfig.Key.Column.getCode(), GridConfig.Key.Column.getName(),
                    EnumUtil.getValues(GridConfig.Column.values()), GridConfig.Column.Column_12.getCode(),
                    GridConfig.Key.Column.getDescription()));
            add(new AnalysisConfig(GridConfig.Key.Row.getCode(), GridConfig.Key.Row.getName(),
                    EnumUtil.getValues(GridConfig.Row.values()), GridConfig.Row.Row_12.getCode(),
                    GridConfig.Key.Row.getDescription()));
            add(new AnalysisConfig(GridConfig.Key.ShowType.getCode(), GridConfig.Key.ShowType.getName(),
                    EnumUtil.getValues(GridConfig.ShowType.values()), GridConfig.ShowType.Duration.getCode(),
                    GridConfig.Key.ShowType.getDescription()));
        }
    };

    public static final List<AnalysisConfig> aoiConfigList = new LinkedList<AnalysisConfig>() {
        {
            add(new AnalysisConfig(AoiConfig.Key.DrawColor.getCode(), AoiConfig.Key.DrawColor.getName(),
                    EnumUtil.getValues(AoiConfig.DrawColor.values()), AoiConfig.DrawColor.Yellow.getCode(),
                    AoiConfig.Key.Diaphaneity.getDescription()));
            add(new AnalysisConfig(AoiConfig.Key.Diaphaneity.getCode(), AoiConfig.Key.Diaphaneity.getName(),
                    EnumUtil.getValues(AoiConfig.Diaphaneity.values()), AoiConfig.Diaphaneity.Diaphaneity_70.getCode(),
                    AoiConfig.Key.Diaphaneity.getDescription()));
        }
    };

    @JsonProperty("Key")
    private String key;

    @JsonIgnore
    private String name;

    @JsonIgnore
    private Map<String, String> value;

    @JsonProperty("Default")
    private String defaultVaule;

    @JsonIgnore
    private String description;

    public AnalysisConfig(String key, String name, Map<String, String> value, String defaultVaule) {
        this.key = key;
        this.name = name;
        this.value = value;
        this.defaultVaule = defaultVaule;
    }

    public AnalysisConfig(String key, String name, Map<String, String> value, String defaultVaule, String description) {
        this.key = key;
        this.name = name;
        this.value = value;
        this.defaultVaule = defaultVaule;
        this.description = description;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Map<String, String> getValue() {
        return value;
    }

    public void setValue(Map<String, String> value) {
        this.value = value;
    }

    public String getDefaultVaule() {
        return defaultVaule;
    }

    public void setDefaultVaule(String defaultVaule) {
        this.defaultVaule = defaultVaule;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

}
